-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from lokalise/migrating_to_xcframework
Migrating to xcframework
- Loading branch information
Showing
22 changed files
with
406 additions
and
110 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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>AvailableLibraries</key> | ||
<array> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64</string> | ||
<key>LibraryPath</key> | ||
<string>Lokalise.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
</dict> | ||
<dict> | ||
<key>LibraryIdentifier</key> | ||
<string>ios-arm64_x86_64-simulator</string> | ||
<key>LibraryPath</key> | ||
<string>Lokalise.framework</string> | ||
<key>SupportedArchitectures</key> | ||
<array> | ||
<string>arm64</string> | ||
<string>x86_64</string> | ||
</array> | ||
<key>SupportedPlatform</key> | ||
<string>ios</string> | ||
<key>SupportedPlatformVariant</key> | ||
<string>simulator</string> | ||
</dict> | ||
</array> | ||
<key>CFBundlePackageType</key> | ||
<string>XFWK</string> | ||
<key>XCFrameworkFormatVersion</key> | ||
<string>1.0</string> | ||
</dict> | ||
</plist> |
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
File renamed without changes.
File renamed without changes.
Binary file not shown.
Binary file not shown.
File renamed without changes.
122 changes: 122 additions & 0 deletions
122
Lokalise.xcframework/ios-arm64_x86_64-simulator/Lokalise.framework/Headers/Lokalise.h
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,122 @@ | ||
// | ||
// Lokalise.h | ||
// Lokalise | ||
// | ||
// Created by Fjodors Levkins on 20/05/15. | ||
// Copyright (c) 2015 Lokalise SIA. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <Lokalise/LokaliseErrors.h> | ||
#import <Lokalise/LokaliseLocalizationType.h> | ||
|
||
@protocol LokaliseDelegate; | ||
|
||
extern NSString *__nonnull LokaliseFrameworkVersion; | ||
extern NSString *__nonnull LokaliseDidUpdateLocalizationNotification; | ||
|
||
@interface Lokalise : NSObject | ||
|
||
@property (class, readonly, strong) Lokalise *__nonnull sharedObject NS_SWIFT_NAME(shared); | ||
|
||
/** | ||
Lokalise SDK token. | ||
*/ | ||
@property (strong, nonatomic, readonly, nullable) NSString *token; | ||
|
||
/** | ||
Lokalise Project ID. | ||
*/ | ||
@property (strong, nonatomic, readonly, nullable) NSString *projectID; | ||
|
||
/** | ||
Set api token and project ID. | ||
@param projectID Project ID. | ||
@param token Lokalise SDK token. | ||
*/ | ||
- (void)setProjectID:(NSString *__nonnull)projectID token:(NSString *__nonnull)token; | ||
|
||
/** | ||
Set api token and project ID. | ||
@param apiToken Lokalise API Token. | ||
@param projectID Project ID. | ||
@deprecated Use [Lokalise.sharedObject setProjectId:projectId token:token] | ||
*/ | ||
- (void)setAPIToken:(NSString *__nonnull)apiToken projectID:(NSString *__nonnull)projectID __deprecated_msg("Use [Lokalise.sharedObject setProjectId:projectId token:token]"); | ||
|
||
/** | ||
Currently selected localization locale. | ||
*/ | ||
@property (strong, nonatomic, readonly, nonnull) NSLocale *localizationLocale; | ||
|
||
/** | ||
@return NSArray of NSLocale objects. Always has at least one locale. | ||
*/ | ||
- (NSArray <NSLocale *> *__nonnull)availableLocales; | ||
|
||
/** | ||
Sets localization locale which will be available right away. | ||
Can be set only to one of available locales. | ||
@param localizationLocale Locale from availableLocales array. | ||
@param makeDefault Application will remember selected locale if set to true. | ||
@param completionBlock Completion block where error is nil if locale is set. | ||
*/ | ||
- (void)setLocalizationLocale:(NSLocale *__nonnull)localizationLocale makeDefault:(BOOL)makeDefault completion:(void (^__nullable)(NSError *__nullable error))completionBlock; | ||
|
||
/** | ||
Current bundle version. 0 if bundle is not loaded or downloaded. | ||
*/ | ||
@property (nonatomic, readonly) NSInteger lokaliseBundleVersion; | ||
|
||
/** | ||
Determines what source is used for localization. | ||
Set to `LokaliseLocalizationRelease` by default. | ||
*/ | ||
@property (nonatomic) LokaliseLocalizationType localizationType; | ||
|
||
/** | ||
This method returns the following when key is nil or not found in table: | ||
- If key is nil and value is nil, returns an empty string. | ||
- If key is nil and value is non-nil, returns value. | ||
- If key is not found and value is nil or an empty string, returns key. | ||
- If key is not found and value is non-nil and not empty, return value. | ||
@param key The key for a string in the table identified by tableName. | ||
@param value The value to return if key is nil or if a localized string for key can’t be found in the table. | ||
@param tableName The receiver’s string table to search. If tableName is nil or is an empty string, the method attempts to use the table in Localizable.strings. | ||
@return A localized version of the string designated by key in table tableName. | ||
*/ | ||
- (NSString *__nonnull)localizedStringForKey:(NSString *__nonnull)key value:(NSString *__nullable)value table:(NSString *__nullable)tableName NS_FORMAT_ARGUMENT(1); | ||
|
||
/** | ||
Check if new localization version is available and downloads it. | ||
@param completionBlock Completion block where parameter `updated` is set to true if new bundle was downloaded and `error` which provides details if something went wrong. | ||
*/ | ||
- (void)checkForUpdatesWithCompletion:(void (^__nullable)(BOOL updated, NSError *__nullable error))completionBlock; | ||
|
||
/** | ||
Deletes all files downloaded by lokalise framework. | ||
*/ | ||
- (void)deleteLokaliseData; | ||
|
||
/** | ||
Forces [[NSBundle mainBundle] localizedStringForKey:key value:value table:tableName] to use [[Lokalise shareObject] localizedStringForKey:key value:value table:tableName]. | ||
*/ | ||
- (void)swizzleMainBundle; | ||
|
||
/** | ||
Deswizzles [[NSBundle mainBundle] localizedStringForKey:key value:value table:tableName]. | ||
*/ | ||
- (void)deswizzleMainBundle; | ||
|
||
@end |
40 changes: 40 additions & 0 deletions
40
Lokalise.xcframework/ios-arm64_x86_64-simulator/Lokalise.framework/Headers/LokaliseErrors.h
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,40 @@ | ||
// | ||
// LokaliseErrors.h | ||
// Lokalise | ||
// | ||
// Created by Fjodors Levkins on 21/05/15. | ||
// Copyright (c) 2015 Lokalise SIA. All rights reserved. | ||
// | ||
|
||
#ifndef Lokalise_LokaliseErrors_h | ||
#define Lokalise_LokaliseErrors_h | ||
|
||
/** | ||
Lokalise API error domain | ||
*/ | ||
static NSString *LKLAPIErrorDomain = @"lokalise.api.error"; | ||
|
||
/** | ||
Lokalise framework error domain | ||
*/ | ||
static NSString *LKLErrorDomain = @"lokalise.error"; | ||
|
||
typedef NS_ENUM(NSInteger, LokaliseErrorCode) { | ||
LokaliseErrorNoProjectData = 1, | ||
LokaliseErrorLocaleNotSupported, | ||
LokaliseErrorNoLokaliseFolder, | ||
LokaliseErrorNoLokaliseBundle, | ||
LokaliseErrorAlreadyUpdating, | ||
LokaliseErrorFailedToExtact, | ||
LokaliseErrorBadServerResponse, | ||
LokaliseErrorBadBundleLocation, | ||
LokaliseErrorBadServerBundleResponse, | ||
LokaliseErrorNoLocalBundleForLocale, | ||
LokaliseErrorNoLocalBundleForLocaleSwizzleDisabled, | ||
LokaliseErrorNoLokaliseBundleForLocale, | ||
LokaliseErrorNoUniqueIdentifier | ||
}; | ||
|
||
|
||
#endif | ||
|
19 changes: 19 additions & 0 deletions
19
...ramework/ios-arm64_x86_64-simulator/Lokalise.framework/Headers/LokaliseLocalizationType.h
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,19 @@ | ||
// | ||
// LokaliseLocalizationType.h | ||
// Lokalise | ||
// | ||
// Created by Fedya Levkin on 04/04/2017. | ||
// Copyright © 2017 Lokalise SIA. All rights reserved. | ||
// | ||
|
||
#ifndef LokaliseLocalizationType_h | ||
#define LokaliseLocalizationType_h | ||
|
||
typedef NS_ENUM(NSInteger, LokaliseLocalizationType) { | ||
LokaliseLocalizationRelease = 0, | ||
LokaliseLocalizationPrerelease = 1, | ||
LokaliseLocalizationLocal = 2, | ||
LokaliseLocalizationDebug = 3 | ||
}; | ||
|
||
#endif /* LokaliseLocalizationType_h */ |
Binary file added
BIN
+734 Bytes
Lokalise.xcframework/ios-arm64_x86_64-simulator/Lokalise.framework/Info.plist
Binary file not shown.
Binary file added
BIN
+361 KB
Lokalise.xcframework/ios-arm64_x86_64-simulator/Lokalise.framework/Lokalise
Binary file not shown.
6 changes: 6 additions & 0 deletions
6
Lokalise.xcframework/ios-arm64_x86_64-simulator/Lokalise.framework/Modules/module.modulemap
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 @@ | ||
framework module Lokalise { | ||
umbrella header "Lokalise.h" | ||
|
||
export * | ||
module * { export * } | ||
} |
Oops, something went wrong.