Skip to content

Commit

Permalink
Updated Binary and Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Cartisim committed Feb 14, 2022
1 parent 2c261bb commit 577e9bc
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let package = Package(
"FCSDKiOS",
"CBARealTime"
]),
.binaryTarget(name: "FCSDKiOS", url: "https://swift-sdk.s3.us-east-2.amazonaws.com/client_sdk/FCSDKiOS-4.0.0-rc.1.2.6.xcframework.zip", checksum: "d7c0c85fb7758b846747b0ce423173135900ffcb32c3f096b0514504aa4e91bc"),
.binaryTarget(name: "FCSDKiOS", url: "https://swift-sdk.s3.us-east-2.amazonaws.com/client_sdk/FCSDKiOS-4.0.0-rc.1.2.8.xcframework.zip", checksum: "c11f7b8b64ba20e357761936f951dff3ee3fd96a78fa026753b5099320f62d92"),
.binaryTarget(name: "CBARealTime", url: "https://swift-sdk.s3.us-east-2.amazonaws.com/real_time/CBARealTime-m95-1.0.1.xcframework.zip", checksum: "b40b7d5b08dbe11f18d60779ffb0cd6576e8e45069d22d81b016a23db88a9633")
]

Expand Down
7 changes: 7 additions & 0 deletions Sources/FCSDK-iOS/FCSDKiOS.docc/FCSDKExtras.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,10 @@ xcodebuild -create-xcframework \
Then you can just run the shell script in it's directory
`sh build.sh`
You should have an XCFramework inside of the build folder indicated in `-output`

## Logging
In order to help you with your debugging, we have provided a log to file functionality while in **DEBUG** mode. In order to access the file run the program flow with your device attached. After the program flow has completed and contains any relevent issues you expected you can navigate to Xcode's Window Tab in the status bar, select Devices and Simulators. Select the Device you ran your program on and download the Container.

![An image showing how to add FCSDKiOS](image_9.png)

Go ahead and right click on the file and select **Show Package Contents**. Next navigate into AppData, then into the Library Directory where you should find a file called **fcsdk.log**. Inspect the file to make sure it contains what you want to share.
55 changes: 42 additions & 13 deletions Sources/FCSDK-iOS/FCSDKiOS.docc/MigratingFromLegacySDK.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,24 @@ Objective-C DispatchQueue
### Method changes

- The following list is a list of methods that have changes and should be noted in your application.
* `end()`
ACBTopicDelegate protocol has 3 methods where the version parameter in the following methods have change from an **int** to **NSInteger**
* didSubmitWithKey
* didDeleteDataSuccessfullyWithKey
* didUpdateWithKey

We have created an optional parameter in the **end()** method for ending **ACBClientCall**s. This method is on the **ACBClientCall** object. The method looks like this in swift.
```swift
@objc public func end(_ call: ACBClientCall? = nil) {
}
```
We now have more flexibilty in ending our call, we can specify the call and if we decide to pass nothing into the parameter then it will end the current call object. This proves to be usefull if our array of ACBClientCalls exceeds the currentCall. In theory this should never happen so we are asking you to conform to this method as in the example bellow.
Bellow are examples of the change in API in Objective-C. Swift users will continues to use an **Int** value.

Swift
```swift
call?.end()
- (void)topic:(ACBTopic *)topic didUpdateWithKey:(NSString *)key value:(NSString *)value version:(NSInteger)version deleted:(BOOL)deleted
```
Objective-C
```swift
[self.call end:nil];
- (void)topic:(ACBTopic *)topic didDeleteDataSuccessfullyWithKey:(NSString *)key version:(NSInteger)version
```
```swift
- (void)topic:(ACBTopic *)topic didSubmitWithKey:(NSString *)key value:(NSString *)value version:(NSInteger)version
````


### Property Name Changes

- The following list is a list of properties that have changes and should be noted in your application.
Expand All @@ -89,7 +90,7 @@ As you can see the changes are identical in both Swift and Objective-C

* sdk version

We now are using a Constants file to store constant things
We now are using a Constants file to store constant things.

Swift
```swift
Expand All @@ -99,4 +100,32 @@ Objective-C
```swift
Constants.SDK_VERSION_NUMBER;
```
###

### AED

- With FCSDKiOS we are moving away from using NSDictionary. FCSDKiOS uses a class conforming to NSObject as a model layer rather than using Dictionaries. That being said we have created an Object for you to use called **AedData** and it's child object called **TopicData**. This approach simplifies your model layer and makes AED easier to work with. This will primarily be noticeable when conforming to the Delegate. The method **didConnectWithData** will now give you this object to work with once you have connected with the intended data.

- You typically will not need to be concerned about constructing this object, but it may be used to store AED Model related things if you desire.

* An **AedData Object** can be create like so..

Swift

```swift
var arrayData = [TopicData]()
let topicData = TopicData(key: "Some Key", value: "Some Value")
arrayData.append(topicData)
let aed = AedData(
type: "Some Type",
name: "Some Name",
topicData: arrayData,
message: "Some Message",
timeout: 0)
```
Objective-C
```swift
TopicData *topicData = [[TopicData alloc] initWithKey:@"Key" value:@"Value"];
NSMutableArray *dataArray = [[NSMutableArray alloc] init];
[dataArray addObject:topicData];
AedData *data = [[AedData alloc] initWithType:@"Some Type" name:@"Some Name" topicData:dataArray message:@"Some Message" _timeout:0];
```
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 577e9bc

Please sign in to comment.