diff --git a/ios/Podfile b/ios/Podfile index 64ba7492ea9f600ca5fc1d116f56aaf4bdd939c9..7ad4682c3ccd0fffcaf64b8de37469864a147318 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '9.0' +platform :ios, '10.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' @@ -33,6 +33,8 @@ def parse_KV_file(file, separator='=') end target 'Runner' do + use_frameworks! + # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock # referring to absolute paths on developers' machines. system('rm -rf .symlinks') diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8f153a0193f9fd66ec99cc1773a2776c0a928663..9fef126e7f1770808a7d6df5be7183f0dde5f953 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1,28 +1,51 @@ PODS: + - AppAuth (1.0.0): + - AppAuth/Core (= 1.0.0) + - AppAuth/ExternalUserAgent (= 1.0.0) + - AppAuth/Core (1.0.0) + - AppAuth/ExternalUserAgent (1.0.0) - Flutter (1.0.0) + - flutter_app_auth_wrapper (0.0.1): + - AppAuth + - Flutter - flutter_web_browser (0.11.0): - Flutter - uni_links (0.0.1): - Flutter + - url_launcher (0.0.1): + - Flutter DEPENDENCIES: - Flutter (from `.symlinks/flutter/ios`) + - flutter_app_auth_wrapper (from `.symlinks/plugins/flutter_app_auth_wrapper/ios`) - flutter_web_browser (from `.symlinks/plugins/flutter_web_browser/ios`) - uni_links (from `.symlinks/plugins/uni_links/ios`) + - url_launcher (from `.symlinks/plugins/url_launcher/ios`) + +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - AppAuth EXTERNAL SOURCES: Flutter: :path: ".symlinks/flutter/ios" + flutter_app_auth_wrapper: + :path: ".symlinks/plugins/flutter_app_auth_wrapper/ios" flutter_web_browser: :path: ".symlinks/plugins/flutter_web_browser/ios" uni_links: :path: ".symlinks/plugins/uni_links/ios" + url_launcher: + :path: ".symlinks/plugins/url_launcher/ios" SPEC CHECKSUMS: + AppAuth: c42547576838bf025b852736dd9b8a1c943fe68f Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a + flutter_app_auth_wrapper: e194830013782a9a914171728299f8f5b285b4ba flutter_web_browser: bdea232160dec44dec86540bee05168cc844ef7c uni_links: d97da20c7701486ba192624d99bffaaffcfc298a + url_launcher: 0067ddb8f10d36786672aa0722a21717dba3a298 -PODFILE CHECKSUM: 7fb83752f59ead6285236625b82473f90b1cb932 +PODFILE CHECKSUM: 097b64e1c00903a097fa4231dd174c10dfb3b629 COCOAPODS: 1.7.4 diff --git a/ios/Runner-Bridging-Header.h b/ios/Runner-Bridging-Header.h new file mode 100644 index 0000000000000000000000000000000000000000..1b2cb5d6d09fe5019d2f930632eaa15b4e51aedc --- /dev/null +++ b/ios/Runner-Bridging-Header.h @@ -0,0 +1,4 @@ +// +// Use this file to import your target's public headers that you would like to expose to Swift. +// + diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c1b1da2ac4bce41ddd4db5a91cab5deada6ee53b..9b932325355e51583af0274d1d8abc6ccf082455 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -7,7 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 11CD157822E0938400C26878 /* File.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11CD157722E0938400C26878 /* File.swift */; }; 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 2B7C3A4D2AAA9093CF166788 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 243F8ED4CD2745551915608C /* Pods_Runner.framework */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; @@ -19,7 +21,6 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - D5351823D830F47138E91DAA /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A384459A6D70E132776BD61F /* libPods-Runner.a */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -39,8 +40,11 @@ /* Begin PBXFileReference section */ 01FCA16E363494253C1046FA /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; + 11CD157622E0938300C26878 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; }; + 11CD157722E0938400C26878 /* File.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = File.swift; sourceTree = "<group>"; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; + 243F8ED4CD2745551915608C /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 35884CBCA3F9937CF00C549A /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; }; @@ -56,7 +60,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; - A384459A6D70E132776BD61F /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; B1242E9899F66FF7989E93F7 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; /* End PBXFileReference section */ @@ -67,7 +70,7 @@ files = ( 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, - D5351823D830F47138E91DAA /* libPods-Runner.a in Frameworks */, + 2B7C3A4D2AAA9093CF166788 /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -81,7 +84,6 @@ 35884CBCA3F9937CF00C549A /* Pods-Runner.release.xcconfig */, 01FCA16E363494253C1046FA /* Pods-Runner.profile.xcconfig */, ); - name = Pods; path = Pods; sourceTree = "<group>"; }; @@ -101,11 +103,13 @@ 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( + 11CD157722E0938400C26878 /* File.swift */, 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 4A245927C125EE2E479434E7 /* Pods */, D6B2911E1033FC3B2F096413 /* Frameworks */, + 11CD157622E0938300C26878 /* Runner-Bridging-Header.h */, ); sourceTree = "<group>"; }; @@ -144,7 +148,7 @@ D6B2911E1033FC3B2F096413 /* Frameworks */ = { isa = PBXGroup; children = ( - A384459A6D70E132776BD61F /* libPods-Runner.a */, + 243F8ED4CD2745551915608C /* Pods_Runner.framework */, ); name = Frameworks; sourceTree = "<group>"; @@ -185,6 +189,7 @@ TargetAttributes = { 97C146ED1CF9000F007C117D = { CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1020; }; }; }; @@ -295,6 +300,7 @@ buildActionMask = 2147483647; files = ( 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, + 11CD157822E0938400C26878 /* File.swift in Sources */, 97C146F31CF9000F007C117D /* main.m in Sources */, 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, ); @@ -377,6 +383,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; DEVELOPMENT_TEAM = S8QB4VV633; ENABLE_BITCODE = NO; @@ -392,6 +399,8 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.vereign.mobileApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h"; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Profile; @@ -507,6 +516,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -521,6 +531,9 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.vereign.mobileApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; @@ -530,6 +543,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -544,6 +558,8 @@ ); PRODUCT_BUNDLE_IDENTIFIER = com.vereign.mobileApp; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner-Bridging-Header.h"; + SWIFT_VERSION = 4.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index c1bd48b166bd078242b91d4c15fd7adb350f65c5..28ec77b17371af1209d20fe9be4f191226b8b61e 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -26,6 +26,20 @@ <string>LaunchScreen</string> <key>io.flutter.embedded_views_preview</key> <string>YES</string> + <key>CFBundleURLTypes</key> + <array> + <dict> + <key>CFBundleIdentifier</key> + <string></string> + <key>CFBundleTypeRole</key> + <string>Editor</string> + <key>CFBundleURLSchemes</key> + <array> + <string>app://com.vereign.app/oauth2</string> + <string>vereign://app.vereign.com</string> + </array> + </dict> + </array> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UISupportedInterfaceOrientations</key> diff --git a/lib/app.dart b/lib/app.dart index 7b3b5318f636a3eb7d5349e6131743d41e06105f..e4c8685c25a88c294cbc376d3bdab9ae1bb392e0 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -53,11 +53,11 @@ class _AppState extends State<App> { } updateAppMode(Uri uri) { - log("Uri ${uri}"); + log("Uri $uri"); if (uri?.path == "/oauth2") { setState(() { _appMode = "oauth"; - _invokerURL = uri.queryParameters["callbackUrl"]; + _invokerURL = uri.queryParameters["invokerUrl"]; }); } else { setState(() { diff --git a/lib/screens/home.dart b/lib/screens/home.dart index fa55a3a3d87b6116a377cf1b79e525ed81642e74..ed3a1de7ff0e91b63a345d21830e93efcfbceb37 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -47,10 +47,8 @@ class _HomeState extends State<Home> { onPressed: () async { Navigator.of(context).pop(); - log('Try run ${widget.invokerURL}'); if (await canLaunch(widget.invokerURL)) { - log('Run ${widget.invokerURL}'); - await launch(widget.invokerURL); + await launch("${widget.invokerURL}?token=$token"); } else { log('Could not launch ${widget.invokerURL}'); }