Skip to content

Commit 7f6146c

Browse files
committed
WIP: loading
1 parent 8bf6895 commit 7f6146c

File tree

12 files changed

+207
-100
lines changed

12 files changed

+207
-100
lines changed

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2016 Ari Lerner <[email protected]>
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

OAuthManager.podspec

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
require 'json'
2+
package = JSON.parse(File.read('package.json'))
3+
version = package["version"]
4+
repo = package['repository']
5+
author = package['author']
6+
7+
default_header_search_paths = [
8+
"$(inherited)",
9+
"${SRCROOT}/../../React/**",
10+
"${SRCROOT}/../node_modules/react-native/**"]
11+
12+
Pod::Spec.new do |s|
13+
14+
s.name = "OAuthManager"
15+
s.version = version
16+
s.summary = "OAuthManager makes working with OAuth 1.0/2.0 oauth providers easy"
17+
s.description = <<-DESC
18+
Integrate OAuth 1.0/2.0 libraries in react native without even thinking about it
19+
DESC
20+
21+
s.homepage = "http://fullstackreact.com"
22+
s.license = { :type => "MIT", :file => "LICENSE" }
23+
s.author = { "Ari Lerner" => author }
24+
s.social_media_url = 'http://twitter.com/fullstackio'
25+
26+
# When using multiple platforms
27+
s.ios.deployment_target = "8.0"
28+
29+
s.source = { :git => repo['url'], :tag => "v#{version}" }
30+
s.public_header_files = "ios/OAuthManager/*.h"
31+
32+
s.source_files = 'ios/OAuthManager/*.{h,m}'
33+
s.preserve_paths = 'README.md', 'package.json', '*.js'
34+
35+
s.default_subspec = 'Core'
36+
37+
s.subspec 'Core' do |ss|
38+
ss.dependency 'OAuthSwift', '~> 0.5.2'
39+
end
40+
41+
s.subspec 'Dev' do |ss|
42+
ss.dependency 'React'
43+
ss.dependency 'React/RCTLinkingIOS'
44+
end
45+
46+
s.xcconfig = {
47+
'HEADER_SEARCH_PATHS' => default_header_search_paths.join(' ')
48+
}
49+
end

ios/OAuthManager.xcodeproj/project.pbxproj

+1-18
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,9 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
77A0D446E94AED73302D360E /* Pods_OAuthManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E623702E9777DB3EE760209 /* Pods_OAuthManager.framework */; };
10+
77A0D446E94AED73302D360E /* Pods_OAuthManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3E623702E9777DB3EE760209 /* Pods_OAuthManager.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
1111
D90285E61D1CFF94006B2E5B /* OAuthSwift.framework in Copy Files */ = {isa = PBXBuildFile; fileRef = D991AB7D1D1B237400DE9E58 /* OAuthSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1212
D935004D1D513CF700C7BA47 /* OAuthManager.m in Sources */ = {isa = PBXBuildFile; fileRef = D935004C1D513CF700C7BA47 /* OAuthManager.m */; };
13-
D99D33651D4B29D800214DA9 /* Pods_OAuthManager.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D991AB7F1D1B237400DE9E58 /* Pods_OAuthManager.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
1413
/* End PBXBuildFile section */
1514

1615
/* Begin PBXContainerItemProxy section */
@@ -75,7 +74,6 @@
7574
isa = PBXFrameworksBuildPhase;
7675
buildActionMask = 2147483647;
7776
files = (
78-
D99D33651D4B29D800214DA9 /* Pods_OAuthManager.framework in Frameworks */,
7977
77A0D446E94AED73302D360E /* Pods_OAuthManager.framework in Frameworks */,
8078
);
8179
runOnlyForDeploymentPostprocessing = 0;
@@ -143,7 +141,6 @@
143141
58B511D81A9E6C8500147676 /* Frameworks */,
144142
58B511D91A9E6C8500147676 /* Copy Files */,
145143
EB72A852C578F8D024FEC67D /* [CP] Copy Pods Resources */,
146-
D9C9A1161D4FF62E000E28EB /* Copy frameworks */,
147144
);
148145
buildRules = (
149146
);
@@ -226,20 +223,6 @@
226223
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
227224
showEnvVarsInLog = 0;
228225
};
229-
D9C9A1161D4FF62E000E28EB /* Copy frameworks */ = {
230-
isa = PBXShellScriptBuildPhase;
231-
buildActionMask = 2147483647;
232-
files = (
233-
);
234-
inputPaths = (
235-
);
236-
name = "Copy frameworks";
237-
outputPaths = (
238-
);
239-
runOnlyForDeploymentPostprocessing = 0;
240-
shellPath = /bin/sh;
241-
shellScript = ./buildScript.sh;
242-
};
243226
EB72A852C578F8D024FEC67D /* [CP] Copy Pods Resources */ = {
244227
isa = PBXShellScriptBuildPhase;
245228
buildActionMask = 2147483647;

ios/OAuthManager/OAuthManager.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#import "OAuthSwift-Swift.h"
1010
#import "OAuthManager.h"
1111

12-
@import OAuthSwift;
12+
// @import OAuthSwift;
1313

1414
typedef NSMutableDictionary *(^CustomSuccessHandler)(OAuthSwiftCredential *, NSURLResponse *, NSDictionary *, NSMutableDictionary*);
1515
typedef void (^OAuthHandler)(OAuthSwiftCredential *, NSURLResponse *, NSDictionary *);

ios/Podfile

+16-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,28 @@ target 'OAuthManager' do
99
installer.pods_project.targets.each do |target|
1010
target.build_configurations.each do |configuration|
1111
target.build_settings(configuration.name)['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
12-
# target.build_settings(configuration.name)['FRAMEWORK_SEARCH_PATHS'] = flat_frameworks
12+
13+
target.build_settings(configuration.name)['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'YES'
14+
target.build_settings(configuration.name)['ENABLE_BITCODE'] = 'NO'
15+
target.build_settings(configuration.name)['MACH_O_TYPE'] = 'mh_dylib'
16+
target.build_settings(configuration.name)['OTHER_LDFLAGS'] = '$(inherited)'
17+
1318
target.build_settings(configuration.name)['USER_HEADER_SEARCH_PATHS'] = "$(BUILT_PRODUCTS_DIR)"
19+
target.build_settings(configuration.name)['LD_DYLIB_INSTALL_NAME'] = '@rpath/${EXECUTABLE_NAME}'
20+
target.build_settings(configuration.name)['LD_RUNPATH_SEARCH_PATHS'] = [
21+
'$(inherited)',
22+
'@rpath',
23+
'@loader_path/../Frameworks',
24+
'@executable_path/Frameworks',
25+
'@executable_path/../../../Frameworks'
26+
].join(' ')
27+
1428
target.build_settings(configuration.name)['HEADER_SEARCH_PATHS'] = [
1529
"$(inherited)", "${PODS_ROOT}/Headers/**",
1630
"$(SRCROOT)/../../../React/**",
1731
"$(SRCROOT)/../../../react-native/React/**"
1832
].join(' ')
33+
1934
target.build_settings(configuration.name)['OTHER_LDFLAGS'] = "$(inherited) -undefined dynamic_lookup"
2035
end
2136
end

ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ DEPENDENCIES:
77
SPEC CHECKSUMS:
88
OAuthSwift: 1ef042d4362e755e24a78f158d817245641a5d24
99

10-
PODFILE CHECKSUM: 5b7e973e85ba1052eef16e34c744c233dd06f4c4
10+
PODFILE CHECKSUM: 6571d55bb553fd40218fed5533bf6b8ce19d6f97
1111

1212
COCOAPODS: 1.0.1

ios/Pods/Manifest.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)