Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "OpenNotes",
"slug": "open-notes",
"version": "1.3.5",
"version": "1.3.6",
"scheme": "opennotes",
"orientation": "default",
"icon": "./assets/icon.png",
Expand All @@ -16,7 +16,7 @@
"ios": {
"bundleIdentifier": "com.builderpro.opennotes",
"icon": "./assets/icon.png",
"buildNumber": "19",
"buildNumber": "20",
"supportsTablet": true,
"usesIcloudStorage": true,
"entitlements": {
Expand Down
8 changes: 4 additions & 4 deletions ios/OpenNotes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@
CODE_SIGN_ENTITLEMENTS = OpenNotes/OpenNotes.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 19;
CURRENT_PROJECT_VERSION = 20;
DEVELOPMENT_TEAM = U2CPXQV7AJ;
ENABLE_BITCODE = NO;
GCC_PREPROCESSOR_DEFINITIONS = (
Expand All @@ -377,7 +377,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -403,15 +403,15 @@
CODE_SIGN_ENTITLEMENTS = OpenNotes/OpenNotes.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 19;
CURRENT_PROJECT_VERSION = 20;
DEVELOPMENT_TEAM = U2CPXQV7AJ;
INFOPLIST_FILE = OpenNotes/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 15.1;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.3.5;
MARKETING_VERSION = 1.3.6;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
55 changes: 47 additions & 8 deletions ios/OpenNotes/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@ public class AppDelegate: ExpoAppDelegate {
reactNativeFactory = factory
bindReactNativeFactory(factory)

#if os(iOS) || os(tvOS)
window = UIWindow(frame: UIScreen.main.bounds)
factory.startReactNative(
withModuleName: "main",
in: window,
launchOptions: launchOptions)
#endif

// React Native starts in SceneDelegate. iOS 27 terminates apps built with
// its SDK at launch unless they adopt the UIScene lifecycle.
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}

Expand All @@ -52,6 +46,51 @@ public class AppDelegate: ExpoAppDelegate {
}
}

class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?

func scene(
_ scene: UIScene,
willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
guard let windowScene = scene as? UIWindowScene,
let appDelegate = UIApplication.shared.delegate as? AppDelegate,
let factory = appDelegate.reactNativeFactory else {
return
}
let window = UIWindow(windowScene: windowScene)
self.window = window
appDelegate.window = window

// Scenes deliver the launch URL (Open in OpenNotes, deep links) through
// connection options; Linking.getInitialURL reads it from launchOptions.
var launchOptions: [UIApplication.LaunchOptionsKey: Any] = [:]
if let url = connectionOptions.urlContexts.first?.url {
launchOptions[.url] = url
}
if let activity = connectionOptions.userActivities.first {
launchOptions[.userActivityDictionary] = [
UIApplication.LaunchOptionsKey.userActivityType: activity.activityType,
"UIApplicationLaunchOptionsUserActivityKey": activity,
]
}
factory.startReactNative(withModuleName: "main", in: window, launchOptions: launchOptions)
}

// Linking API: URLs opened while the app is running.
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
for context in URLContexts {
_ = RCTLinkingManager.application(UIApplication.shared, open: context.url, options: [:])
}
}

// Universal Links
func scene(_ scene: UIScene, continue userActivity: NSUserActivity) {
_ = RCTLinkingManager.application(UIApplication.shared, continue: userActivity, restorationHandler: { _ in })
}
}

class ReactNativeDelegate: ExpoReactNativeFactoryDelegate {
// Extension point for config-plugins

Expand Down
21 changes: 19 additions & 2 deletions ios/OpenNotes/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.3.5</string>
<string>1.3.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
Expand All @@ -54,7 +54,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>19</string>
<string>20</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSMinimumSystemVersion</key>
Expand All @@ -80,6 +80,23 @@
</array>
<key>RCTNewArchEnabled</key>
<true/>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneConfigurationName</key>
<string>Default Configuration</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
</dict>
</array>
</dict>
</dict>
<key>UILaunchStoryboardName</key>
<string>SplashScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
Loading