forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
27c5b3a
commit 6f971b9
Showing
10 changed files
with
126 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,3 +64,6 @@ yarn-error.log | |
|
||
# testing | ||
/coverage | ||
|
||
# Generated asset catalog | ||
**/RNAssets.xcassets/*.imageset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
|
||
/* Begin PBXBuildFile section */ | ||
04157F50C11E9F16DDD69B17 /* libPods-RNTester.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2F98312BF816A7F2688C036D /* libPods-RNTester.a */; }; | ||
0CF641B628ECB21C00DCDD11 /* RNAssets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0CF641B528ECB21C00DCDD11 /* RNAssets.xcassets */; }; | ||
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; | ||
2DDEF0101F84BF7B00DBDF73 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2DDEF00F1F84BF7B00DBDF73 /* Images.xcassets */; }; | ||
383889DA23A7398900D06C3E /* RCTConvert_UIColorTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 383889D923A7398900D06C3E /* RCTConvert_UIColorTests.m */; }; | ||
|
@@ -78,6 +79,7 @@ | |
|
||
/* Begin PBXFileReference section */ | ||
0CC3BE1A25DDB68A0033CAEB /* RNTester.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = RNTester.entitlements; path = RNTester/RNTester.entitlements; sourceTree = "<group>"; }; | ||
0CF641B528ECB21C00DCDD11 /* RNAssets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = RNAssets.xcassets; path = RNTester/RNAssets.xcassets; sourceTree = "<group>"; }; | ||
13B07F961A680F5B00A75B9A /* RNTester.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = RNTester.app; sourceTree = BUILT_PRODUCTS_DIR; }; | ||
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = RNTester/AppDelegate.h; sourceTree = "<group>"; }; | ||
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = RNTester/Info.plist; sourceTree = "<group>"; }; | ||
|
@@ -218,6 +220,7 @@ | |
13B07FB71A68108700A75B9A /* main.m */, | ||
832F45BA2A8A6E1F0097B4E6 /* SwiftTest.swift */, | ||
2DDEF00F1F84BF7B00DBDF73 /* Images.xcassets */, | ||
0CF641B528ECB21C00DCDD11 /* RNAssets.xcassets */, | ||
8145AE05241172D900A3F8DA /* LaunchScreen.storyboard */, | ||
680759612239798500290469 /* Fabric */, | ||
272E6B3A1BEA846C001FCF37 /* NativeExampleViews */, | ||
|
@@ -377,8 +380,9 @@ | |
3B2555DA1E9C50DBD7DEDDC7 /* [CP] Check Pods Manifest.lock */, | ||
13B07F871A680F5B00A75B9A /* Sources */, | ||
13B07F8C1A680F5B00A75B9A /* Frameworks */, | ||
13B07F8E1A680F5B00A75B9A /* Resources */, | ||
68CD48B71D2BCB2C007E06A9 /* Build JS Bundle */, | ||
5CF0FD27207FC6EC00C13D65 /* Start Metro */, | ||
13B07F8E1A680F5B00A75B9A /* Resources */, | ||
79E8BE2B119D4C5CCD2F04B3 /* [RN] Copy Hermes Framework */, | ||
4E5A5A192F46F13B14A915AF /* [CP] Embed Pods Frameworks */, | ||
4E2AB2EE08A8E6F86E659152 /* [CP] Copy Pods Resources */, | ||
|
@@ -480,6 +484,7 @@ | |
isa = PBXResourcesBuildPhase; | ||
buildActionMask = 2147483647; | ||
files = ( | ||
0CF641B628ECB21C00DCDD11 /* RNAssets.xcassets in Resources */, | ||
2DDEF0101F84BF7B00DBDF73 /* Images.xcassets in Resources */, | ||
8145AE06241172D900A3F8DA /* LaunchScreen.storyboard in Resources */, | ||
3D2AFAF51D646CF80089D1A3 /* [email protected] in Resources */, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -100,4 +100,25 @@ - (void)testIsLocalAssetsURLParam | |
XCTAssertFalse(RCTIsLocalAssetURL(otherAssetsURL)); | ||
} | ||
|
||
- (void)testAssetCatalogNameForURL | ||
{ | ||
NSString *validAssetPath = | ||
[NSString stringWithFormat:@"file://%@/assets/AwesomeModule/[email protected]", [[NSBundle mainBundle] resourcePath]]; | ||
NSString *result = RCTAssetCatalogNameForURL([NSURL URLWithString:validAssetPath]); | ||
XCTAssertEqualObjects(result, @"awesomemodule_icon"); | ||
|
||
NSString *validAssetNoScalePath = | ||
[NSString stringWithFormat:@"file://%@/assets/AwesomeModule/icon.png", [[NSBundle mainBundle] resourcePath]]; | ||
result = RCTAssetCatalogNameForURL([NSURL URLWithString:validAssetNoScalePath]); | ||
XCTAssertEqualObjects(result, @"awesomemodule_icon"); | ||
|
||
NSString *notPackagerAssetPath = | ||
[NSString stringWithFormat:@"file://%@/icon.png", [[NSBundle mainBundle] resourcePath]]; | ||
result = RCTAssetCatalogNameForURL([NSURL URLWithString:notPackagerAssetPath]); | ||
XCTAssertNil(result); | ||
|
||
result = RCTAssetCatalogNameForURL(nil); | ||
XCTAssertNil(result); | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |