Skip to content

Commit

Permalink
CBL-5735 : Fix missing exported symbols (#3281) (#3283)
Browse files Browse the repository at this point in the history
* Ported the fix from release/3.2 branch.

* Used the same approach as CBL-C to generate CE and EE exported symbole file. The workflow will be updating CBL.txt or CBL_EE.txt (Contains EE only symbols) at Objective-C/Exports folder and run generate_exports.sh script. The final export symbol files will be in the Objective-C/Exports/Generated folder.

* Ensured to include all symbols by cross checking with the symbols extracted from the header files.

* Removed obsoleted predefined classes which don’t exist anymore.
  • Loading branch information
pasin authored May 9, 2024
1 parent d491d13 commit 0bab912
Show file tree
Hide file tree
Showing 11 changed files with 359 additions and 42 deletions.
30 changes: 26 additions & 4 deletions CouchbaseLite.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2217,7 +2217,6 @@
275FF6581E412C66005F90DD /* DocPerfTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DocPerfTest.m; sourceTree = "<group>"; };
275FF6B61E47B2FC005F90DD /* ExceptionUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExceptionUtils.h; sourceTree = "<group>"; };
275FF6B71E47B2FC005F90DD /* ExceptionUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExceptionUtils.m; sourceTree = "<group>"; };
275FF6BE1E48081B005F90DD /* CouchbaseLite.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = CouchbaseLite.exp; sourceTree = "<group>"; };
276740B51EE7381E0036DE42 /* CBLTrustCheck.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CBLTrustCheck.h; sourceTree = "<group>"; };
276740B61EE7381E0036DE42 /* CBLTrustCheck.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = CBLTrustCheck.mm; sourceTree = "<group>"; };
27B69A121F2A4B7400782145 /* MYAnonymousIdentity.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MYAnonymousIdentity.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2249,6 +2248,11 @@
40086B172B7EDDD400DA6770 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
40086B452B803B2A00DA6770 /* CBLBlockConflictResolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CBLBlockConflictResolver.h; sourceTree = "<group>"; };
40086B522B803B2B00DA6770 /* CBLBlockConflictResolver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBLBlockConflictResolver.m; sourceTree = "<group>"; };
40A789282BE2C7D100CA43A1 /* CBL_EE.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = CBL_EE.exp; sourceTree = "<group>"; };
40A789292BE2C7D100CA43A1 /* CBL.exp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.exports; path = CBL.exp; sourceTree = "<group>"; };
40A7892B2BE2C7D100CA43A1 /* CBL_EE.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CBL_EE.txt; sourceTree = "<group>"; };
40A7892C2BE2C7D100CA43A1 /* CBL.txt */ = {isa = PBXFileReference; lastKnownFileType = text; path = CBL.txt; sourceTree = "<group>"; };
40A7892D2BE2C7D100CA43A1 /* generate_exports.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = generate_exports.sh; sourceTree = "<group>"; };
40C5FD5A2B9946E6004BFD3B /* CBLVectorIndexTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CBLVectorIndexTypes.h; sourceTree = "<group>"; };
40E905462B5B6D9D00EDF483 /* CouchbaseLiteSwift.private.modulemap */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.module-map"; path = CouchbaseLiteSwift.private.modulemap; sourceTree = "<group>"; };
40EF68102B71891A00F0CB50 /* remove_private_module.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = remove_private_module.sh; sourceTree = "<group>"; };
Expand All @@ -2269,7 +2273,6 @@
40FC1AB12B9286E700394276 /* CBLListenerCertificateAuthenticator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBLListenerCertificateAuthenticator.m; sourceTree = "<group>"; };
40FC1AB22B9286E700394276 /* CBLListenerPasswordAuthenticator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CBLListenerPasswordAuthenticator.m; sourceTree = "<group>"; };
40FC1AB32B9286E700394276 /* CBLURLEndpointListenerConfiguration.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CBLURLEndpointListenerConfiguration.mm; sourceTree = "<group>"; };
40FC1AB42B9286E700394276 /* CouchbaseLite.exp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.exports; path = CouchbaseLite.exp; sourceTree = "<group>"; };
40FC1AB72B9286E700394276 /* CBLEncryptionKey+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CBLEncryptionKey+Internal.h"; sourceTree = "<group>"; };
40FC1AB82B9286E700394276 /* CBLDatabase+EncryptionInternal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "CBLDatabase+EncryptionInternal.mm"; sourceTree = "<group>"; };
40FC1ABA2B9286E700394276 /* CBLTLSIdentity+Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "CBLTLSIdentity+Internal.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3075,6 +3078,26 @@
path = Extensions;
sourceTree = "<group>";
};
40A7892A2BE2C7D100CA43A1 /* Generated */ = {
isa = PBXGroup;
children = (
40A789282BE2C7D100CA43A1 /* CBL_EE.exp */,
40A789292BE2C7D100CA43A1 /* CBL.exp */,
);
path = Generated;
sourceTree = "<group>";
};
40A7892E2BE2C7D100CA43A1 /* Exports */ = {
isa = PBXGroup;
children = (
40A7892A2BE2C7D100CA43A1 /* Generated */,
40A7892B2BE2C7D100CA43A1 /* CBL_EE.txt */,
40A7892C2BE2C7D100CA43A1 /* CBL.txt */,
40A7892D2BE2C7D100CA43A1 /* generate_exports.sh */,
);
path = Exports;
sourceTree = "<group>";
};
40EF68FD2B7755FD00F0CB50 /* Resources */ = {
isa = PBXGroup;
children = (
Expand All @@ -3092,7 +3115,6 @@
40FC1AD72B9286E700394276 /* Replicator */,
40FC1AB52B9286E700394276 /* Internal */,
40FC1AD62B9286E700394276 /* CBLEdition.h */,
40FC1AB42B9286E700394276 /* CouchbaseLite.exp */,
);
name = "Objective-C";
path = "../couchbase-lite-ios-ee/Sources/Objective-C";
Expand Down Expand Up @@ -3991,9 +4013,9 @@
9388CBE521BF717C005CA66D /* Log */,
934F4C931E241FB500F90659 /* Internal */,
93BFCD931E0380A300E52F8A /* Tests */,
40A7892E2BE2C7D100CA43A1 /* Exports */,
4006AB4E2B9106000036E66D /* CBLEdition.h */,
9398D9FD1E03531A00464432 /* CouchbaseLite.h */,
275FF6BE1E48081B005F90DD /* CouchbaseLite.exp */,
9398D9FE1E03531A00464432 /* Info.plist */,
);
path = "Objective-C";
Expand Down
2 changes: 1 addition & 1 deletion Objective-C/CBLQueryBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#import <Foundation/Foundation.h>

@class CBLQuery, CBLQuerySelectResult, CBLQueryDataSource, CBLQueryJoin;
@class CBLQueryOrdering, CBLQueryGroupBy, CBLQueryLimit;
@class CBLQueryOrdering, CBLQueryLimit;
@class CBLQueryExpression;

NS_ASSUME_NONNULL_BEGIN
Expand Down
10 changes: 5 additions & 5 deletions Objective-C/CBLQueryDataSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#import <Foundation/Foundation.h>

@class CBLQueryDatabase, CBLDatabase;
@class CBLDatabase;
@class CBLCollection;

NS_ASSUME_NONNULL_BEGIN
Expand All @@ -34,7 +34,7 @@ NS_ASSUME_NONNULL_BEGIN
Create a database data source.
@param database The database used as the data source as the query.
@return The CBLQueryDatabase instance.
@return The CBLQueryDataSource instance for the database.
*/
+ (instancetype) database: (CBLDatabase*)database
__deprecated_msg("Use [DataSource collection: [database defaultCollection]]) instead.");
Expand All @@ -44,15 +44,15 @@ __deprecated_msg("Use [DataSource collection: [database defaultCollection]]) ins
@param database The database used as the data source as the query.
@param alias The alias name of the data source.
@return The CBLQueryDatabase instance.
@return The CBLQueryDataSource instance for the database.
*/
+ (instancetype) database: (CBLDatabase*)database as: (nullable NSString*)alias
__deprecated_msg("Use [DataSource collection: [database defaultCollection] as:]) instead.");

/** Create a collection data source.
@param collection The collection used as the data source as the query.
@return The CBLQueryDatabase instance.
@return The CBLQueryDataSource instance for the collection.
*/
+ (instancetype) collection: (CBLCollection*)collection;

Expand All @@ -61,7 +61,7 @@ __deprecated_msg("Use [DataSource collection: [database defaultCollection] as:])
@param collection The collection used as the data source as the query.
@param alias The alias name of the data source.
@return The CBLQueryDatabase instance.
@return The CBLQueryDataSource instance for the collection.
*/
+ (instancetype) collection: (CBLCollection*)collection as: (nullable NSString*)alias;

Expand Down
1 change: 0 additions & 1 deletion Objective-C/CBLQueryExpression.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

@class CBLBlob;
@class CBLQueryCollation;
@class CBLVariableExpression;
@protocol CBLQueryFullTextIndexExpressionProtocol;

NS_ASSUME_NONNULL_BEGIN
Expand Down
57 changes: 28 additions & 29 deletions Objective-C/CouchbaseLite.exp → Objective-C/Exports/CBL.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# CouchbaseLite.exp
# CBL.txt
# CouchbaseLite
#
# Copyright (c) 2017 Couchbase, Inc All rights reserved.
# Copyright (c) 2024 Couchbase, Inc All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -15,15 +15,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# All public global symbols -- classes, functions, constants -- need to be declared here.
# All public symbols -- classes and constants -- need to be declared here.
# Run generate_exports.sh after modifying this file.

# Public classes:
# Classes:
.objc_class_name_CBLArray
.objc_class_name_CBLAuthenticator
.objc_class_name_CBLBasicAuthenticator
.objc_class_name_CBLBlob
.objc_class_name_CBLCollection
.objc_class_name_CBLCollectionChange
.objc_class_name_CBLCollectionConfiguration
.objc_class_name_CBLConflict
.objc_class_name_CBLConflictResolver
.objc_class_name_CBLConsoleLogger
.objc_class_name_CBLDatabase
.objc_class_name_CBLDatabaseChange
Expand All @@ -34,11 +38,13 @@
.objc_class_name_CBLDocumentFragment
.objc_class_name_CBLDocumentReplication
.objc_class_name_CBLFileLogger
.objc_class_name_CBLFragment
.objc_class_name_CBLFullTextIndex
.objc_class_name_CBLFullTextIndexConfiguration
.objc_class_name_CBLFullTextIndexItem
.objc_class_name_CBLFragment
.objc_class_name_CBLIndex
.objc_class_name_CBLIndexBuilder
.objc_class_name_CBLIndexConfiguration
.objc_class_name_CBLLog
.objc_class_name_CBLLogFileConfiguration
.objc_class_name_CBLMutableArray
Expand Down Expand Up @@ -70,42 +76,35 @@
.objc_class_name_CBLReplicator
.objc_class_name_CBLReplicatorChange
.objc_class_name_CBLReplicatorConfiguration
.objc_class_name_CBLReplicatorStatus
.objc_class_name_CBLScope
.objc_class_name_CBLSessionAuthenticator
.objc_class_name_CBLURLEndpoint
.objc_class_name_CBLValueIndex
.objc_class_name_CBLValueIndexItem
.objc_class_name_CBLIndexConfiguration
.objc_class_name_CBLFullTextIndexConfiguration
.objc_class_name_CBLValueIndexConfiguration
.objc_class_name_CBLValueIndexItem

# Blob Constants:
_kCBLBlobType
_kCBLTypeProperty
# Constants:
_CBLErrorDomain
_kCBLBlobContentTypeProperty
_kCBLBlobDigestProperty
_kCBLBlobLengthProperty
_kCBLBlobContentTypeProperty

# Default Constants:
_kCBLDefaultLogFileUsePlaintext
_kCBLDefaultLogFileUsePlainText
_kCBLDefaultLogFileMaxSize
_kCBLDefaultLogFileMaxRotateCount
_kCBLBlobType
_kCBLDefaultCollectionName
_kCBLDefaultFullTextIndexIgnoreAccents
_kCBLDefaultReplicatorType
_kCBLDefaultReplicatorContinuous
_kCBLDefaultLogFileMaxRotateCount
_kCBLDefaultLogFileMaxSize
_kCBLDefaultLogFileUsePlainText
_kCBLDefaultReplicatorAcceptParentCookies
_kCBLDefaultReplicatorAllowReplicatingInBackground
_kCBLDefaultReplicatorContinuous
_kCBLDefaultReplicatorEnableAutoPurge
_kCBLDefaultReplicatorHeartbeat
_kCBLDefaultReplicatorMaxAttemptsSingleShot
_kCBLDefaultReplicatorMaxAttemptsContinuous
_kCBLDefaultReplicatorMaxAttemptWaitTime
_kCBLDefaultReplicatorMaxAttemptsContinuous
_kCBLDefaultReplicatorMaxAttemptsSingleShot
_kCBLDefaultReplicatorMaxAttemptsWaitTime
_kCBLDefaultReplicatorEnableAutoPurge
_kCBLDefaultReplicatorSelfSignedCertificateOnly
_kCBLDefaultReplicatorAcceptParentCookies

# Others constants:
_CBLErrorDomain
_kCBLAllPropertiesName
_kCBLDefaultCollectionName
_kCBLDefaultReplicatorType
_kCBLDefaultScopeName
_kCBLTypeProperty
65 changes: 65 additions & 0 deletions Objective-C/Exports/CBL_EE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# CBL_EE.txt
# CouchbaseLite
#
# Copyright (c) 2024 Couchbase, Inc All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# All public symbols -- classes and constants -- need to be declared here.
# Run generate_exports.sh after modifying this file.

# Classes:
.objc_class_name_CBLCoreMLPredictiveModel
.objc_class_name_CBLClientCertificateAuthenticator
.objc_class_name_CBLDatabaseEndpoint
.objc_class_name_CBLEncryptionKey
.objc_class_name_CBLListenerCertificateAuthenticator
.objc_class_name_CBLListenerPasswordAuthenticator
.objc_class_name_CBLMessage
.objc_class_name_CBLMessageEndpoint
.objc_class_name_CBLMessageEndpointListener
.objc_class_name_CBLMessageEndpointListenerChange
.objc_class_name_CBLMessageEndpointListenerConfiguration
.objc_class_name_CBLMessagingError
.objc_class_name_CBLPrediction
.objc_class_name_CBLPredictiveIndex
.objc_class_name_CBLQueryPredictionFunction
.objc_class_name_CBLTLSIdentity
.objc_class_name_CBLURLEndpointListener
.objc_class_name_CBLURLEndpointListenerConfiguration
.objc_class_name_CBLVectorEncoding
.objc_class_name_CBLVectorIndexConfiguration

# Constants:
_kCBLDefaultListenerPort
_kCBLDefaultListenerDisableTls
_kCBLDefaultListenerReadOnly
_kCBLDefaultListenerEnableDeltaSync
_kCBLDefaultVectorIndexDistanceMetric
_kCBLDefaultVectorIndexEncoding
_kCBLCertAttrCommonName
_kCBLCertAttrCountry
_kCBLCertAttrEmailAddress
_kCBLCertAttrGivenName
_kCBLCertAttrHostname
_kCBLCertAttrIPAddress
_kCBLCertAttrLocality
_kCBLCertAttrOrganization
_kCBLCertAttrOrganizationUnit
_kCBLCertAttrPostalAddress
_kCBLCertAttrPostalCode
_kCBLCertAttrPseudonym
_kCBLCertAttrRegisteredID
_kCBLCertAttrStateOrProvince
_kCBLCertAttrSurname
_kCBLCertAttrURL
89 changes: 89 additions & 0 deletions Objective-C/Exports/Generated/CBL.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
# GENERATED BY generate_exports.sh -- DO NOT EDIT

.objc_class_name_CBLArray
.objc_class_name_CBLAuthenticator
.objc_class_name_CBLBasicAuthenticator
.objc_class_name_CBLBlob
.objc_class_name_CBLCollection
.objc_class_name_CBLCollectionChange
.objc_class_name_CBLCollectionConfiguration
.objc_class_name_CBLConflict
.objc_class_name_CBLConflictResolver
.objc_class_name_CBLConsoleLogger
.objc_class_name_CBLDatabase
.objc_class_name_CBLDatabaseChange
.objc_class_name_CBLDatabaseConfiguration
.objc_class_name_CBLDictionary
.objc_class_name_CBLDocument
.objc_class_name_CBLDocumentChange
.objc_class_name_CBLDocumentFragment
.objc_class_name_CBLDocumentReplication
.objc_class_name_CBLFileLogger
.objc_class_name_CBLFragment
.objc_class_name_CBLFullTextIndex
.objc_class_name_CBLFullTextIndexConfiguration
.objc_class_name_CBLFullTextIndexItem
.objc_class_name_CBLIndex
.objc_class_name_CBLIndexBuilder
.objc_class_name_CBLIndexConfiguration
.objc_class_name_CBLLog
.objc_class_name_CBLLogFileConfiguration
.objc_class_name_CBLMutableArray
.objc_class_name_CBLMutableDictionary
.objc_class_name_CBLMutableDocument
.objc_class_name_CBLMutableFragment
.objc_class_name_CBLQuery
.objc_class_name_CBLQueryArrayExpression
.objc_class_name_CBLQueryArrayFunction
.objc_class_name_CBLQueryBuilder
.objc_class_name_CBLQueryChange
.objc_class_name_CBLQueryCollation
.objc_class_name_CBLQueryDataSource
.objc_class_name_CBLQueryExpression
.objc_class_name_CBLQueryFullTextExpression
.objc_class_name_CBLQueryFullTextFunction
.objc_class_name_CBLQueryFunction
.objc_class_name_CBLQueryJoin
.objc_class_name_CBLQueryLimit
.objc_class_name_CBLQueryMeta
.objc_class_name_CBLQueryOrdering
.objc_class_name_CBLQueryParameters
.objc_class_name_CBLQueryResult
.objc_class_name_CBLQueryResultSet
.objc_class_name_CBLQuerySelectResult
.objc_class_name_CBLQuerySortOrder
.objc_class_name_CBLQueryVariableExpression
.objc_class_name_CBLReplicatedDocument
.objc_class_name_CBLReplicator
.objc_class_name_CBLReplicatorChange
.objc_class_name_CBLReplicatorConfiguration
.objc_class_name_CBLReplicatorStatus
.objc_class_name_CBLScope
.objc_class_name_CBLSessionAuthenticator
.objc_class_name_CBLURLEndpoint
.objc_class_name_CBLValueIndex
.objc_class_name_CBLValueIndexConfiguration
.objc_class_name_CBLValueIndexItem
_CBLErrorDomain
_kCBLBlobContentTypeProperty
_kCBLBlobDigestProperty
_kCBLBlobLengthProperty
_kCBLBlobType
_kCBLDefaultCollectionName
_kCBLDefaultFullTextIndexIgnoreAccents
_kCBLDefaultLogFileMaxRotateCount
_kCBLDefaultLogFileMaxSize
_kCBLDefaultLogFileUsePlainText
_kCBLDefaultReplicatorAcceptParentCookies
_kCBLDefaultReplicatorAllowReplicatingInBackground
_kCBLDefaultReplicatorContinuous
_kCBLDefaultReplicatorEnableAutoPurge
_kCBLDefaultReplicatorHeartbeat
_kCBLDefaultReplicatorMaxAttemptWaitTime
_kCBLDefaultReplicatorMaxAttemptsContinuous
_kCBLDefaultReplicatorMaxAttemptsSingleShot
_kCBLDefaultReplicatorMaxAttemptsWaitTime
_kCBLDefaultReplicatorSelfSignedCertificateOnly
_kCBLDefaultReplicatorType
_kCBLDefaultScopeName
_kCBLTypeProperty
Loading

0 comments on commit 0bab912

Please sign in to comment.