A former high official of the Franco distatorship and his wife were killed by a bomb in their Barcelona apartment yesterday as a renewed wave of violence plagued the Catalan city.

Violent bombings in Barcelona, the capital of the Catalan region, have surprised government officials here. They had expected that the recent granting of limited-self-rule to Catalonia by King Juan Carlos and Premier Adolfo Suarez would keep the region peaceful.

The gruesome killing of Joaquin Viola, 64, a former mayor of Barcelona appointed by Franco, and his 58-year-old wife occured after four people wearing masks broke into their home and taped a bomb onto Viola's body.

The outlawed International Communists Party, an extreme leftist urban guerrilla group, claimed responsibility for the double killing in a phone call to the government-operated radio station in Barcelona. The caller gave no motive for the act but said he was telephoning from just across the neary bornder with France.

The killings followed other violence in the Basque country and other parts of Spain and coincided with government attempts to tighten security not only against political violence but against a spreading wave of robberies, gas station holdups, muggings and rapes.

Last week urban guerrillas destroyed Barcelona's largest music hall, La Scala, with fire bombs. Four persons perished in the blaze. Police blamed "anarchists" for the attack and are holding a number of young people for questioning.

Tuesday night two bombs exploded in a Barcelona court building and urban guerrillas hurled a molotov cocktail at a sentry box outside Barcelona's main prison.

Catalan sources said tonight that the region has been the scene of bombings for weeks, but that they have gone largely unreported to support the government's argument in the Basque provinces that the Catalan "example" of compromise and dialogue is the only way to obtain a measure of self-rule.

So far, Catalan vilence has been very different from that in the Basque country, where ETA, the separatist underground, has been trying to cold-bloodedly gun down former high officials of the Franco regime and police in planned ambushes. Intermittently ETA has employed explosives for a major operation - such as the 1973 bomb assassination of Premier Luis Carrero Blanco in Madrid.

Catalan terrorists, following the pattern of their pre-1936-39 civil war predecessors, appear to have a preference for bombs.

The killers of Viola, who had been removed from his post by the King, rang the bell of his apartment at around 8:30 this morning, Mrs. Viola opened the door and was confronted by three men and a woman brandishing sub machineguns.

According to police accounts and new reports, Viola was ordered into the bedroom while his wife, the children and servants were herded into another room.

In the bedroom the raiders attached an explosive device to Viola's body. Then they brought his wife and handed her a note, apparently asking for ransom and telling her that the explosive would not detonate unless he moved violently or tried to take it off.

Something apparently went wrong and the bomb exploded unexpectedly. Viola was killed instantly and his wife died moments later. One of the attackers were reportedly injured and fled with blood streaming down his face.

The deadly technique exactly paralled that used last May in Barcelona by raiders who rigged a bomb on the body of Jose Maria Bulto, head of one of Spain's largest chemical companies. They demanded $7.4 million ransom and warned him not to try to remove the bomb. He ignored the warning and was killed by a powerful blast.

Catalonia and the Basque region are not the only parts of Spain plagued by violence. The Canary Islands have recently been the scene of bombings by the Algeria-based liberation movement for the archipelago, a wintertime haven for European tourists.