Skip to content

Commit

Permalink
-Added Objective - C xcframework
Browse files Browse the repository at this point in the history
  • Loading branch information
vijay-jangid-sb committed May 25, 2022
1 parent feaaf07 commit b772a47
Show file tree
Hide file tree
Showing 71 changed files with 1,841 additions and 1 deletion.
Binary file added .DS_Store
Binary file not shown.
Binary file added DevnagriSdkObjc.xcframework/.DS_Store
Binary file not shown.
40 changes: 40 additions & 0 deletions DevnagriSdkObjc.xcframework/Info.plist
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_x86_64-simulator</string>
<key>LibraryPath</key>
<string>DevnagriSdkObjc.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>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>DevnagriSdkObjc.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// DevnagriSdk.h
// DevnagriSdkObjc
//
// Created by Dinesh Gautam on 27/04/22.
//

#import <Foundation/Foundation.h>
#import "NSBundle+DevnagriSDK.h"
NS_ASSUME_NONNULL_BEGIN


@interface DevnagriSdk : NSObject
{

}


+ (nonnull instancetype)shared;
-(void)initSdk:(NSString *)apiKey updateStringsTime:(int)inMinutes;
-(NSString *)getCurrentApplicationLanguageCode;
-(NSDictionary *)getEnglishStrings;
-(void)updateAppLocale:(NSString *)code;
-(void)updateTranslations;
-(void)getAllSupportableLanguagesCallback:(void (^)(NSArray *arrAllSupportingLang))callback;
-(void)getTranslationOfStringWithSentence:(NSString *)sentence callback:(void (^)(NSString *strTranslation))callback;
-(void)getTranslationOfStringsWithSentences:(NSArray *)sentences callback:(void (^)(NSArray *arrTranslations))callback;
-(void)getTranslationsOfDictionary:(NSDictionary *)dictionary callback:(void (^)(NSDictionary *dictTranslation))callback;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// DevnagriSdkObjc.h
// DevnagriSdkObjc
//
// Created by Dinesh Gautam on 27/04/22.
//

#import <Foundation/Foundation.h>
#import <DevnagriSdkObjc/DevnagriSdk.h>
#import <DevnagriSdkObjc/NSBundle+DevnagriSDK.h>

//! Project version number for DevnagriSdkObjc.
FOUNDATION_EXPORT double DevnagriSdkObjcVersionNumber;

//! Project version string for DevnagriSdkObjc.
FOUNDATION_EXPORT const unsigned char DevnagriSdkObjcVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <DevnagriSdkObjc/PublicHeader.h>


Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// NSBundle+DevnagriSDK.h
// iLikeIt
//
// Created by Sohan Seervi on 12/05/22.
// Copyright © 2022 Raywenderlich. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSBundle (DevnagriSDK)

@end

NS_ASSUME_NONNULL_END
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module DevnagriSdkObjc {
umbrella header "DevnagriSdkObjc.h"

export *
module * { export * }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{\rtf1\ansi\ansicpg1252\cocoartf2580
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 -How to create xcframework\
1. Build Settings / Build Libraries for Distribution set YES\
2. Build Settings / Skip Install set NO\
3. Open termnial\
\
*Remove exist xcframework\
rm -rf /tmp/xcf/\
\
\
xcodebuild archive -scheme DevnagriSdkObjc -destination="iOS" -archivePath /tmp/xcf/ios.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphoneos SKIP_INSTALL=NO\
\
\
xcodebuild archive -scheme DevnagriSdkObjc -destination="iOS Simulator" -archivePath /tmp/xcf/iossimulator.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphonesimulator SKIP_INSTALL=NO\
\
\
xcodebuild -create-xcframework -framework /tmp/xcf/ios.xcarchive/Products/Library/Frameworks/DevnagriSdkObjc.framework -framework /tmp/xcf/iossimulator.xcarchive/Products/Library/Frameworks/DevnagriSdkObjc.framework -output DevnagriSdkObjc.xcframework\
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// DevnagriSdk.h
// DevnagriSdkObjc
//
// Created by Dinesh Gautam on 27/04/22.
//

#import <Foundation/Foundation.h>
#import "NSBundle+DevnagriSDK.h"
NS_ASSUME_NONNULL_BEGIN


@interface DevnagriSdk : NSObject
{

}


+ (nonnull instancetype)shared;
-(void)initSdk:(NSString *)apiKey updateStringsTime:(int)inMinutes;
-(NSString *)getCurrentApplicationLanguageCode;
-(NSDictionary *)getEnglishStrings;
-(void)updateAppLocale:(NSString *)code;
-(void)updateTranslations;
-(void)getAllSupportableLanguagesCallback:(void (^)(NSArray *arrAllSupportingLang))callback;
-(void)getTranslationOfStringWithSentence:(NSString *)sentence callback:(void (^)(NSString *strTranslation))callback;
-(void)getTranslationOfStringsWithSentences:(NSArray *)sentences callback:(void (^)(NSArray *arrTranslations))callback;
-(void)getTranslationsOfDictionary:(NSDictionary *)dictionary callback:(void (^)(NSDictionary *dictTranslation))callback;
@end

NS_ASSUME_NONNULL_END
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//
// DevnagriSdkObjc.h
// DevnagriSdkObjc
//
// Created by Dinesh Gautam on 27/04/22.
//

#import <Foundation/Foundation.h>
#import <DevnagriSdkObjc/DevnagriSdk.h>
#import <DevnagriSdkObjc/NSBundle+DevnagriSDK.h>

//! Project version number for DevnagriSdkObjc.
FOUNDATION_EXPORT double DevnagriSdkObjcVersionNumber;

//! Project version string for DevnagriSdkObjc.
FOUNDATION_EXPORT const unsigned char DevnagriSdkObjcVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <DevnagriSdkObjc/PublicHeader.h>


Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// NSBundle+DevnagriSDK.h
// iLikeIt
//
// Created by Sohan Seervi on 12/05/22.
// Copyright © 2022 Raywenderlich. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSBundle (DevnagriSDK)

@end

NS_ASSUME_NONNULL_END
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module DevnagriSdkObjc {
umbrella header "DevnagriSdkObjc.h"

export *
module * { export * }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{\rtf1\ansi\ansicpg1252\cocoartf2580
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww9000\viewh8400\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0

\f0\fs24 \cf0 -How to create xcframework\
1. Build Settings / Build Libraries for Distribution set YES\
2. Build Settings / Skip Install set NO\
3. Open termnial\
\
*Remove exist xcframework\
rm -rf /tmp/xcf/\
\
\
xcodebuild archive -scheme DevnagriSdkObjc -destination="iOS" -archivePath /tmp/xcf/ios.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphoneos SKIP_INSTALL=NO\
\
\
xcodebuild archive -scheme DevnagriSdkObjc -destination="iOS Simulator" -archivePath /tmp/xcf/iossimulator.xcarchive -derivedDataPath /tmp/iphoneos -sdk iphonesimulator SKIP_INSTALL=NO\
\
\
xcodebuild -create-xcframework -framework /tmp/xcf/ios.xcarchive/Products/Library/Frameworks/DevnagriSdkObjc.framework -framework /tmp/xcf/iossimulator.xcarchive/Products/Library/Frameworks/DevnagriSdkObjc.framework -output DevnagriSdkObjc.xcframework\
}
Loading

0 comments on commit b772a47

Please sign in to comment.