Skip to content
Open
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
2 changes: 1 addition & 1 deletion CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Contributors

Contributors to the codebase, in reverse chronological order:

- Eric Mentele, @EricMentele
- Dave Carlson, @drdavec
- Pascal Pfiffner, @p2

4 changes: 2 additions & 2 deletions Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>4.2.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>4.2.0.0</string>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
Expand Down
12 changes: 11 additions & 1 deletion Sources/iOS/Auth+iOS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ extension Auth {
- parameter callback: The callback that is called when authorization completes or fails
*/
func authorize(with oauth: OAuth2, properties: SMARTAuthProperties, callback: @escaping ((OAuth2JSON?, OAuth2Error?) -> Void)) {
authContext = UIApplication.shared.keyWindow?.rootViewController

let rootViewController = UIApplication.shared.keyWindow?.rootViewController
authContext = rootViewController

if var topController = rootViewController {
while let presentedViewController = topController.presentedViewController {
topController = presentedViewController
}

authContext = topController
}

oauth.authConfig.authorizeContext = authContext
oauth.authConfig.authorizeEmbedded = properties.embedded
Expand Down
6 changes: 4 additions & 2 deletions SwiftSMART.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 4.2.1.0;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -567,6 +567,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.2.1;
METAL_ENABLE_DEBUG_INFO = YES;
"OTHER_SWIFT_FLAGS[arch=*]" = "-DDEBUG -DNO_MODEL_IMPORT -DNO_MODULE_IMPORT -DNO_KEYCHAIN_IMPORT";
PRODUCT_BUNDLE_IDENTIFIER = "org.chip.${PRODUCT_NAME:rfc1034identifier}";
Expand All @@ -584,7 +585,7 @@
isa = XCBuildConfiguration;
buildSettings = {
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 4.2.1.0;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
Expand All @@ -596,6 +597,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 4.2.1;
METAL_ENABLE_DEBUG_INFO = NO;
"OTHER_SWIFT_FLAGS[arch=*]" = "-DNO_MODEL_IMPORT -DNO_KEYCHAIN_IMPORT -DNO_MODULE_IMPORT";
PRODUCT_BUNDLE_IDENTIFIER = "org.chip.${PRODUCT_NAME:rfc1034identifier}";
Expand Down